package com.tinyseed.emcp.api.exception.entity;

import com.tinyseed.hmxx.common.annotation.Query;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * tb_exception_info
 *
 * @author tinyCode
 * @date 2019-12-13 14:47:17
 */
@Data
@Table(name = "tb_exception_info")
@Entity()
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExceptionInfo implements Serializable {

    /**
     * 唯一主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @Column(unique = true)
    private Long jaId;

    /**
     * 异常描述
     */
    @Column(nullable = true)
    private String description;
    /**
     * 异常类型
     */
    @Column(nullable = true)
    private String eventType;
    /**
     * 企业名称
     */
    @Query(type = Query.Type.EQUAL)
    @Column(nullable = true)
    private String enterpriseName;
    /**
     * 组织名称
     */
    @Query(type = Query.Type.EQUAL)
    @Column(nullable = true)
    private String organizeName;
    /**
     * 处理状态
     */
    @Column(nullable = true)
    private String currentStatus;
    /**
     * 处理状态code
     */
    @Column(nullable = true)
    private String currentStatusCode;
    /**
     * 企业名称
     */
    @Column(nullable = true)
    private Long enterpriseId;
    /**
     * 监测点名称
     */
    @Column(nullable = true)
    private String monitorName;
    /**
     * 组织机构id
     */
    @Column(nullable = true)
    private String organizeId;
    /**
     * 监测点id
     */
    @Column(nullable = true)
    private Long monitorId;
    /**
     * 监测点地址
     */
    @Column(nullable = true)
    private String instrumentAddress;
    /**
     * 监测点类型
     */
    @Column(nullable = true)
    private String equipmentType;
    /**
     * 异常备注，具体到某个设备异常
     */
    @Column(nullable = true)
    private String remark;
    /**
     * 创建时间
     */
    @Column(nullable = true)
    private Timestamp createTime;
    /**
     * 最后修改时间
     */
    @Column(nullable = true)
    private Timestamp modifyTime;
    /**
     * 创建人
     */
    @Column(nullable = true)
    private String creator;
    /**
     * 最后操作人
     */
    @Column(nullable = true)
    private String modifier;


    /**
     * sms下发状态(Y：已下发 N：未下发)
     */
    @Column(nullable = true)
    private String smsIssuedStatus;


    /**
     * Description 网关编号
     * Version 1.0
     * Date 2020/3/12 8:17 下午
     * Author howard
     *
     * @param null
     * @return
     */
    @Column(nullable = true)
    private String swicthSn;
    @Column(nullable = true)
    private String shopName;

}
